package com.kung.qvs.entity.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.kung.qvs.entity.CustomerBean;
import com.kung.qvs.entity.DeviceBean;
import com.kung.qvs.entity.GarbageTypeBean;
import com.kung.qvs.entity.PrintDataBean;
import com.kung.qvs.entity.ProductBean;
import com.kung.qvs.entity.ProductInfoBean;
import com.kung.qvs.entity.PropInfoBean;
import com.kung.qvs.entity.SupplierBean;
import com.kung.qvs.entity.WorkerBean;

import com.kung.qvs.entity.greendao.CustomerBeanDao;
import com.kung.qvs.entity.greendao.DeviceBeanDao;
import com.kung.qvs.entity.greendao.GarbageTypeBeanDao;
import com.kung.qvs.entity.greendao.PrintDataBeanDao;
import com.kung.qvs.entity.greendao.ProductBeanDao;
import com.kung.qvs.entity.greendao.ProductInfoBeanDao;
import com.kung.qvs.entity.greendao.PropInfoBeanDao;
import com.kung.qvs.entity.greendao.SupplierBeanDao;
import com.kung.qvs.entity.greendao.WorkerBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig customerBeanDaoConfig;
    private final DaoConfig deviceBeanDaoConfig;
    private final DaoConfig garbageTypeBeanDaoConfig;
    private final DaoConfig printDataBeanDaoConfig;
    private final DaoConfig productBeanDaoConfig;
    private final DaoConfig productInfoBeanDaoConfig;
    private final DaoConfig propInfoBeanDaoConfig;
    private final DaoConfig supplierBeanDaoConfig;
    private final DaoConfig workerBeanDaoConfig;

    private final CustomerBeanDao customerBeanDao;
    private final DeviceBeanDao deviceBeanDao;
    private final GarbageTypeBeanDao garbageTypeBeanDao;
    private final PrintDataBeanDao printDataBeanDao;
    private final ProductBeanDao productBeanDao;
    private final ProductInfoBeanDao productInfoBeanDao;
    private final PropInfoBeanDao propInfoBeanDao;
    private final SupplierBeanDao supplierBeanDao;
    private final WorkerBeanDao workerBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        customerBeanDaoConfig = daoConfigMap.get(CustomerBeanDao.class).clone();
        customerBeanDaoConfig.initIdentityScope(type);

        deviceBeanDaoConfig = daoConfigMap.get(DeviceBeanDao.class).clone();
        deviceBeanDaoConfig.initIdentityScope(type);

        garbageTypeBeanDaoConfig = daoConfigMap.get(GarbageTypeBeanDao.class).clone();
        garbageTypeBeanDaoConfig.initIdentityScope(type);

        printDataBeanDaoConfig = daoConfigMap.get(PrintDataBeanDao.class).clone();
        printDataBeanDaoConfig.initIdentityScope(type);

        productBeanDaoConfig = daoConfigMap.get(ProductBeanDao.class).clone();
        productBeanDaoConfig.initIdentityScope(type);

        productInfoBeanDaoConfig = daoConfigMap.get(ProductInfoBeanDao.class).clone();
        productInfoBeanDaoConfig.initIdentityScope(type);

        propInfoBeanDaoConfig = daoConfigMap.get(PropInfoBeanDao.class).clone();
        propInfoBeanDaoConfig.initIdentityScope(type);

        supplierBeanDaoConfig = daoConfigMap.get(SupplierBeanDao.class).clone();
        supplierBeanDaoConfig.initIdentityScope(type);

        workerBeanDaoConfig = daoConfigMap.get(WorkerBeanDao.class).clone();
        workerBeanDaoConfig.initIdentityScope(type);

        customerBeanDao = new CustomerBeanDao(customerBeanDaoConfig, this);
        deviceBeanDao = new DeviceBeanDao(deviceBeanDaoConfig, this);
        garbageTypeBeanDao = new GarbageTypeBeanDao(garbageTypeBeanDaoConfig, this);
        printDataBeanDao = new PrintDataBeanDao(printDataBeanDaoConfig, this);
        productBeanDao = new ProductBeanDao(productBeanDaoConfig, this);
        productInfoBeanDao = new ProductInfoBeanDao(productInfoBeanDaoConfig, this);
        propInfoBeanDao = new PropInfoBeanDao(propInfoBeanDaoConfig, this);
        supplierBeanDao = new SupplierBeanDao(supplierBeanDaoConfig, this);
        workerBeanDao = new WorkerBeanDao(workerBeanDaoConfig, this);

        registerDao(CustomerBean.class, customerBeanDao);
        registerDao(DeviceBean.class, deviceBeanDao);
        registerDao(GarbageTypeBean.class, garbageTypeBeanDao);
        registerDao(PrintDataBean.class, printDataBeanDao);
        registerDao(ProductBean.class, productBeanDao);
        registerDao(ProductInfoBean.class, productInfoBeanDao);
        registerDao(PropInfoBean.class, propInfoBeanDao);
        registerDao(SupplierBean.class, supplierBeanDao);
        registerDao(WorkerBean.class, workerBeanDao);
    }
    
    public void clear() {
        customerBeanDaoConfig.clearIdentityScope();
        deviceBeanDaoConfig.clearIdentityScope();
        garbageTypeBeanDaoConfig.clearIdentityScope();
        printDataBeanDaoConfig.clearIdentityScope();
        productBeanDaoConfig.clearIdentityScope();
        productInfoBeanDaoConfig.clearIdentityScope();
        propInfoBeanDaoConfig.clearIdentityScope();
        supplierBeanDaoConfig.clearIdentityScope();
        workerBeanDaoConfig.clearIdentityScope();
    }

    public CustomerBeanDao getCustomerBeanDao() {
        return customerBeanDao;
    }

    public DeviceBeanDao getDeviceBeanDao() {
        return deviceBeanDao;
    }

    public GarbageTypeBeanDao getGarbageTypeBeanDao() {
        return garbageTypeBeanDao;
    }

    public PrintDataBeanDao getPrintDataBeanDao() {
        return printDataBeanDao;
    }

    public ProductBeanDao getProductBeanDao() {
        return productBeanDao;
    }

    public ProductInfoBeanDao getProductInfoBeanDao() {
        return productInfoBeanDao;
    }

    public PropInfoBeanDao getPropInfoBeanDao() {
        return propInfoBeanDao;
    }

    public SupplierBeanDao getSupplierBeanDao() {
        return supplierBeanDao;
    }

    public WorkerBeanDao getWorkerBeanDao() {
        return workerBeanDao;
    }

}
